<?php
/**
 * File: ItemsController.class.php
 * User: Mr.Cong
 * Date: 2015/1/13 0013
 * Time: 17:55
 */

namespace Admin\Controller;

use Admin\Api\ItemsApi;

/**
 * Class BillController
 * Info: 提单控制器
 *
 * @package Admin\Controller
 */
class BillController extends AdminController
{
    /**
     * 未审核提单;
     */
    public function index()
    {
        $this->meta_title = '未审核提单';
        $itmes = new ItemsApi();
        $count = D('inventory')->where('is_delete!=1')->count();
        $Page = $itmes->page($count,30);
        $list = $itmes->getAllItems('InventoryPcView','inventory_id,company_name,site_name,status,create_at','is_delete!=1','inventory_id desc',$Page->firstRow,$Page->listRows);
        $show = $Page->show();
        $this->assign('_list',$list);
        $this->assign('_page',$show);
        $this->display();
    }

    /**
     * 已审核提单
     */
    public function review()
    {
        $this->meta_title = '已审核提单';
        $this->display();
    }

    /**
     * 我要提单
     */
    public function newitems()
    {
        $this->meta_title = '我要提单';
        $this->display();
    }

    /**
     * 添加提单
     */
    public function addNewItems()
    {
        if (IS_POST) {

        }
    }

    /**
     * 未通过审核的提单
     */
    public function notReview(){
        $this->meta_title = '未通过审核的提单';
        $this->display();
    }
}